package com.ycz.master.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ycz.master.pojo.Emp;
import com.ycz.master.pojo.EmpAndEmpTypeAndDept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * author zyc
 * Created on 2021/9/30 13:18
 */
@Mapper
public interface EmpMapper extends BaseMapper<Emp> {
    /**
     * author kxz
     * @return
     */
    @Select("select e.emp_id,e.ename,e.account,e.tel,t.type_name,d.dname from emp e,dept d,empType t where e.dept_id=d.dept_id and e.job=t.emp_type_id")
    List<EmpAndEmpTypeAndDept> selectAllEmp();

    int insertemp(Emp emp);
}
